<ion-view view-title="运输协议" cache-view="false" ng-init="init()" hide-back-button="false">
  <ion-content class="gray_back">
    <section class="g_main">
      <!-- 货主运单确认发车 -->
      <section class="truck_line track_line-edit fill_info">
        <ul>
          <li ng-click="choosedate()">
            <h4>装货日期</h4>
            <input disabled ng-model="waybillInfo.shipment_time_disp"/>
          </li>
        </ul>
        <ul>
          <li ng-click="toSelectCity(0)">
            <h4>起点</h4>
            <input disabled ng-model="waybillInfo.start_area_disp"/>
          </li>
          <li>
            <h4>详细地址</h4>
            <input type="text" placeholder="推荐填写" ng-model="waybillInfo.start_addr">
          </li>
          <li ng-click="toSelectCity(1)">
            <h4>终点</h4>
            <input disabled ng-model="waybillInfo.end_area_disp"/>
          </li>
          <li>
            <h4>详细地址</h4>
            <input type="text" placeholder="推荐填写" ng-model="waybillInfo.end_addr">
          </li>
        </ul>
        <ul>
          <li>
            <h4>货品名称</h4>
            <input type="text" placeholder="请输入货品名称" ng-model="waybillInfo.cargo_name">
          </li>
          <li ng-click="selectCargoType()">
            <h4>货品类型</h4>
            <input disabled ng-model="waybillInfo.cargo_type_disp">
          </li>
          <li class="have_unit">
            <h4>体积</h4>
            <input type="number" placeholder="请输入体积" ng-model="waybillInfo.cargo_bulk">
            <span>立方</span>
          </li>
          <li class="have_unit">
            <h4>重量</h4>
            <input type="number" placeholder="请输入重量" ng-model="waybillInfo.cargo_weight">
            <span>吨</span>
          </li>
          <li class="have_unit">
            <h4>次数</h4>
            <input type="number" placeholder="请输入次数" ng-model="protocolInfo.cargo_count">
          </li>
          <li class="have_unit">
            <h4>货品价值</h4>
            <input type="number" placeholder="请输入货品价值" ng-model="protocolInfo.cargo_value">
            <span>元</span>
          </li>
          <li ng-click="setarrivetime()">
            <h4>预计到达时间</h4>
            <input disabled placeholder="请输入货品价值" ng-model="protocolInfo.arrival_time_disp">
          </li>
        </ul>
        <ul>
          <li class="have_unit" style="height:50px">
            <h4>保证金</h4>
            <input type="number" placeholder="请输入保证金" ng-model="waybillInfo.deposit">
            <span>元</span>
          </li>
          <li class="have_unit">
            <h4>运价（除保证金）</h4>
            <input type="number" placeholder="请输入运价（除保证金）" ng-model="waybillInfo.price">
            <span>元</span>
          </li>
        </ul>
        <ul>
          <!--li>
            <h4>装货联系人</h4>
            <input type="text" placeholder="请输入联系人及联系方式" ng-model="waybillInfo.consignor">
          </li-->
          <li>
            <h4>收货联系人</h4>
            <input type="text" placeholder="请输入收货联系人" ng-model="protocolInfo.consignee">
          </li>
          <li>
            <h4>联系人手机</h4>
            <input type="text" placeholder="请输入联系人手机" ng-model="protocolInfo.consignee_phone">
          </li>
          <li>
            <h4>备注</h4>
            <input type="text" placeholder="请输入备注信息" ng-model="waybillInfo.remark">
          </li>
        </ul>
        <div class="pay_mode" style="display:none">
          <label><input type="radio" value=0 ng-model="protocolInfo.payment_term">在线支付</label>
          <label><input type="radio" value=1 ng-model="protocolInfo.payment_term">线下支付</label>
        </div>
        <ul>
          <li class="radio" style="padding:0px">
            <ion-toggle ng-model="protocolInfo.need_invoice" toggle-class="toggle-calm">增值税专用发票</ion-toggle>
          </li>
         </ul>
        <ul ng-show="protocolInfo.need_invoice">
          <li class="select" ng-show="protocolInfo.need_invoice" ng-click="toAddressEdit()">
            <h4>发票信息</h4>
            <input disabled ng-model="protocolInfo.post_addr">
          </li>
        </ul>
        <ul>
          <li class="radio" style="padding:0px">
            <ion-toggle ng-model="protocolInfo.need_insurance" toggle-class="toggle-calm">保险</ion-toggle>
          </li>
        </ul>
        <ul>
          <li class="radio" style="padding:0px">
            <ion-toggle ng-model="waybillInfo.payment_term" toggle-class="toggle-calm" style="height: 44px"  ng-change="paymentChange()"><h4>线下支付</h4></ion-toggle>
          </li>
        </ul>
        <ul ng-show="protocolInfo.payment_term">
          <li>
            <h4>指定收款人</h4>
            <input type="text" placeholder="请输入收款人姓名" ng-model="waybillInfo.payee">
          </li>
          <li>
            <h4>身份证号</h4>
            <input type="text" placeholder="请输入身份证号" ng-model="waybillInfo.payee_idcard">
          </li>
          <li>
            <h4>开户行</h4>
            <input type="text" placeholder="请输入开户行" ng-model="waybillInfo.bank_name">
          </li>
          <li>
            <h4>银行卡号</h4>
            <input type="text" placeholder="请输入银行卡号" ng-model="waybillInfo.bank_card">
          </li>
        </ul>
        <div class="btn_box">
          <button class="btn_save" ng-click="generateProtocol(0)">生成协议</button>
          <button class="btn_cancel" ng-click="generateProtocol(1)">预览协议</button>
        </div>
      </section>
    </section>
  </ion-content>
</ion-view>
